<%@ Page Language="C#" AutoEventWireup="false" MasterPageFile="~/App_MasterPages/layout.Master"
    CodeBehind="AdminProductEdit.aspx.cs" Inherits="eStore.UI.AdminProductEditPage" %>

<asp:Content ContentPlaceHolderID="leftContent" ID="MPLeftPane" runat="server" />
<asp:Content ContentPlaceHolderID="mainContent" ID="MPContent" runat="server">
    <portal:mojoPanel ID="mp1" runat="server" ArtisteerCssClass="art-Post" RenderArtisteerBlockContentDivs="true">
        <mp:CornerRounderTop ID="ctop1" runat="server" />
        <asp:Panel ID="pnlProduct" runat="server" CssClass="art-Post-inner panelwrapper admin estore estoreadminproduct tundra"
            DefaultButton="btnSave">
            <portal:mojoPanel ID="MojoPanel1" runat="server" ArtisteerCssClass="art-PostContent">
                <div class="modulecontent">
                <div class="breadcrumbs">
                        <asp:HyperLink ID="lnkStoreMenu" runat="server" />&nbsp;&gt;
                        <asp:HyperLink ID="lnkAdminProduct" runat="server" />&nbsp;&gt;
                        <asp:HyperLink ID="lnkCurrentPage" runat="server" CssClass="selectedcrumb" />
                    </div>
                    <fieldset>
                        <legend>
                            <asp:Literal ID="ltrTitle" runat="server"></asp:Literal>
                        </legend>
                        <asp:Panel ID="pnlMain" runat="server">
                            <div id="divtabs" class="mojo-tabs">
                                <ul>
                                    <li class="selected"><a href="#tabSettings">
                                        <asp:Literal ID="litSettingsTab" runat="server" /></a></li>
                                    <li><a href="#tabDescription">
                                        <asp:Literal ID="litDescriptionTab" runat="server" /></a></li>
                                    <li><a href="#tabMeta">
                                        <asp:Literal ID="litMetaTab" runat="server" /></a></li>
                                </ul>
                                <div id="tabSettings">
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="SiteLabel1" runat="server" CssClass="settinglabel" ConfigKey="ProductNameLabel"
                                            ResourceFile="eStoreResources" ForControl="txtName" />
                                        <asp:TextBox ID="txtName" runat="server" MaxLength="255" CssClass="verywidetextbox forminput" />
                                    </div>
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="lblCategory" runat="server" CssClass="settinglabel" ConfigKey="ProductCategoryNameLabel"
                                            ResourceFile="eStoreResources" ForControl="lbCategory" />
                                        <div class="list">
                                            <asp:ListBox ID="lbCategory" runat="server" CssClass="listbox" />
                                        </div>
                                    </div>
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="SiteLabelImage" runat="server" CssClass="settinglabel" ConfigKey="ProductImageOnProductListLabel"
                                            ResourceFile="eStoreResources" ForControl="fuImageUrl" />
                                        <NeatUpload:InputFile ID="nuImageUrl" runat="server" />
                                        <NeatUpload:ProgressBar ID="progressBar" runat="server">
                                        </NeatUpload:ProgressBar>
                                        <%--<asp:FileUpload ID="fuImageUrl" runat="server" CssClass="forminput" />--%>
                                        <asp:Label ID="lblImageUrlError" runat="server" />
                                    </div>
                                    <div class="settingrow">
                                        <asp:UpdatePanel ID="updImgDel" runat="server">
                                            <ContentTemplate>
                                                <div runat="server" id="divImage" visible="false">
                                                    <asp:Image runat="server" ID="imgView" Width="100px" Style="max-height: 60px" />
                                                    <asp:ImageButton ID="btnDeleteImg" runat="server" />
                                                </div>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </div>
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="SiteLabel8" runat="server" CssClass="settinglabel" ConfigKey="PrimarySortRankLabel"
                                            ResourceFile="eStoreResources" ForControl="txtSortRank1" />
                                        <asp:TextBox ID="txtSortRank1" runat="server" Text="5000" MaxLength="20" CssClass="forminput smalltextbox" />
                                    </div>
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="SiteLabel9" runat="server" CssClass="settinglabel" ConfigKey="SecondarySortRankLabel"
                                            ResourceFile="eStoreResources" ForControl="txtSortRank2" />
                                        <asp:TextBox ID="txtSortRank2" runat="server" Text="5000" MaxLength="20" CssClass="forminput smalltextbox" />
                                    </div>
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="SiteLabel4" runat="server" CssClass="settinglabel" ConfigKey="ProductPriceLabel"
                                            ResourceFile="eStoreResources" ForControl="txtPrice" />
                                        <asp:TextBox ID="txtPrice" runat="server" MaxLength="255" CssClass="forminput mediumtextbox" />
                                        <asp:Literal ID="ltrPriceCurrency" runat="server"></asp:Literal>
                                    </div>
                                    <asp:Panel ID="pnlTax" runat="server" CssClass="settingrow">
                                        <mp:SiteLabel ID="lblTaxClassGuid" runat="server" CssClass="settinglabel" ConfigKey="ProductTaxClassLabel"
                                            ResourceFile="eStoreResources" ForControl="ddTaxClassGuid" />
                                        <asp:DropDownList ID="ddTaxClassGuid" runat="server" EnableTheming="false" DataValueField="Guid"
                                            DataTextField="Title" CssClass="forminput" />
                                    </asp:Panel>
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="lblIsVisible" runat="server" CssClass="settinglabel" ConfigKey="ProductIsVisibleLabel"
                                            ResourceFile="eStoreResources" ForControl="chkIsVisible" />
                                        <asp:CheckBox ID="chkIsVisible" runat="server" CssClass="forminput" />
                                    </div>
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="lblIsSpecial" runat="server" CssClass="settinglabel" ConfigKey="ProductIsSpecialLabel"
                                            ResourceFile="eStoreResources" ForControl="chkIsSpecial" />
                                        <asp:CheckBox ID="chkIsSpecial" runat="server" CssClass="forminput" />
                                    </div>
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="SiteLabel3" runat="server" CssClass="settinglabel" ConfigKey="ProductIsDonationLabel"
                                            ResourceFile="eStoreResources" ForControl="chkIsDonation" />
                                        <asp:CheckBox ID="chkIsDonation" runat="server" CssClass="forminput" />
                                    </div>
                                </div>
                                <div id="tabDescription">
                                    <div class="settingrow">
                                        <mpe:EditorControl ID="edDescription" runat="server">
                                        </mpe:EditorControl>
                                    </div>
                                </div>
                                <div id="tabMeta">
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="SiteLabel2" runat="server" ForControl="txtMetaDescription" CssClass="settinglabel"
                                            ConfigKey="MetaDescriptionLabel" ResourceFile="eStoreResources"></mp:SiteLabel>
                                        <asp:TextBox ID="txtMetaDescription" runat="server" Columns="50" MaxLength="255"
                                            CssClass="forminput verywidetextbox"></asp:TextBox>
                                    </div>
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="SiteLabel10" runat="server" ForControl="txtMetaKeywords" CssClass="settinglabel"
                                            ConfigKey="MetaKeywordsLabel" ResourceFile="eStoreResources"></mp:SiteLabel>
                                        <asp:TextBox ID="txtMetaKeywords" runat="server" Columns="50" MaxLength="255" CssClass="forminput verywidetextbox"></asp:TextBox>
                                    </div>
                                    <div class="settingrow">
                                        <mp:SiteLabel ID="lblAdditionalMetaTags" runat="server" CssClass="settinglabel" ConfigKey="MetaAdditionalLabel"
                                            ResourceFile="eStoreResources"></mp:SiteLabel>
                                        <portal:mojoHelpLink ID="MojoHelpLink25" runat="server" HelpKey="pagesettingsadditionalmetahelp" />
                                    </div>
                                    <div class="settingrow">
                                        <asp:UpdatePanel ID="updMetaLinks" runat="server" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <mp:mojoGridView ID="grdMetaLinks" runat="server" CssClass="editgrid" AutoGenerateColumns="false"
                                                    DataKeyNames="Guid" EnableTheming="false">
                                                    <Columns>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:Button ID="btnEditMetaLink" runat="server" CommandName="Edit" Text='<%# Resources.eStoreResources.ContentMetaGridEditButton %>' />
                                                                <asp:ImageButton ID="btnMoveUpMetaLink" runat="server" ImageUrl='<%# Page.ResolveUrl("~/Data/SiteImages/up.gif") %>'
                                                                    CommandName="MoveUp" CommandArgument='<%# Eval("Guid") %>' AlternateText='<%# Resources.eStoreResources.ContentMetaGridMoveUpButton %>'
                                                                    Visible='<%# (Convert.ToInt32(Eval("SortRank")) > 3) %>' />
                                                                <asp:ImageButton ID="btnMoveDownMetaLink" runat="server" ImageUrl='<%# Page.ResolveUrl("~/Data/SiteImages/dn.gif") %>'
                                                                    CommandName="MoveDown" CommandArgument='<%# Eval("Guid") %>' AlternateText='<%# Resources.eStoreResources.ContentMetaGridMoveDownButton %>' />
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <%# Eval("Rel") %>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                                <div class="settingrow">
                                                                    <mp:SiteLabel ID="lblNameMetaRel" runat="server" ForControl="txtRel" CssClass="settinglabel"
                                                                        ConfigKey="ContentMetaRelLabel" ResourceFile="eStoreResources" />
                                                                    <asp:TextBox ID="txtRel" CssClass="widetextbox forminput" runat="server" Text='<%# Eval("Rel") %>' />
                                                                    <asp:RequiredFieldValidator ID="reqMetaName" runat="server" ControlToValidate="txtRel"
                                                                        ErrorMessage='<%# Resources.eStoreResources.ContentMetaLinkRelRequired %>' ValidationGroup="metalink" />
                                                                </div>
                                                                <div class="settingrow">
                                                                    <mp:SiteLabel ID="lblMetaHref" runat="server" ForControl="txtHref" CssClass="settinglabel"
                                                                        ConfigKey="ContentMetaMetaHrefLabel" ResourceFile="eStoreResources" />
                                                                    <asp:TextBox ID="txtHref" CssClass="verywidetextbox forminput" runat="server" Text='<%# Eval("Href") %>' />
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtHref"
                                                                        ErrorMessage='<%# Resources.eStoreResources.ContentMetaLinkHrefRequired %>' ValidationGroup="metalink" />
                                                                </div>
                                                                <div class="settingrow">
                                                                    <mp:SiteLabel ID="lblScheme" runat="server" ForControl="txtScheme" CssClass="settinglabel"
                                                                        ConfigKey="ContentMetHrefLangLabel" ResourceFile="eStoreResources" />
                                                                    <asp:TextBox ID="txtHrefLang" CssClass="widetextbox forminput" runat="server" Text='<%# Eval("HrefLang") %>' />
                                                                </div>
                                                                <div class="settingrow">
                                                                    <asp:Button ID="btnUpdateMetaLink" runat="server" Text='<%# Resources.eStoreResources.ContentMetaGridUpdateButton %>'
                                                                        CommandName="Update" ValidationGroup="metalink" CausesValidation="true" />
                                                                    <asp:Button ID="btnDeleteMetaLink" runat="server" Text='<%# Resources.eStoreResources.ContentMetaGridDeleteButton %>'
                                                                        CommandName="Delete" CausesValidation="false" />
                                                                    <asp:Button ID="btnCancelMetaLink" runat="server" Text='<%# Resources.eStoreResources.ContentMetaGridCancelButton %>'
                                                                        CommandName="Cancel" CausesValidation="false" />
                                                                </div>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <%# Eval("Href") %>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </mp:mojoGridView>
                                                <div class="settingrow">
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <asp:Button ID="btnAddMetaLink" runat="server" />&nbsp;
                                                            </td>
                                                            <td>
                                                                <asp:UpdateProgress ID="prgMetaLinks" runat="server" AssociatedUpdatePanelID="updMetaLinks">
                                                                    <ProgressTemplate>
                                                                        <img src='<%= Page.ResolveUrl("~/Data/SiteImages/indicators/indicator1.gif") %>'
                                                                            alt=' ' />
                                                                    </ProgressTemplate>
                                                                </asp:UpdateProgress>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </div>
                                    <div class="settingrow">
                                        <asp:UpdatePanel ID="upMeta" runat="server" UpdateMode="Conditional">
                                            <ContentTemplate>
                                                <mp:mojoGridView ID="grdContentMeta" runat="server" CssClass="editgrid" AutoGenerateColumns="false"
                                                    DataKeyNames="Guid" EnableTheming="false">
                                                    <Columns>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <asp:Button ID="btnEditMeta" runat="server" CommandName="Edit" Text='<%# Resources.eStoreResources.ContentMetaGridEditButton %>' />
                                                                <asp:ImageButton ID="btnMoveUpMeta" runat="server" ImageUrl='<%# Page.ResolveUrl("~/Data/SiteImages/up.gif") %>'
                                                                    CommandName="MoveUp" CommandArgument='<%# Eval("Guid") %>' AlternateText='<%# Resources.eStoreResources.ContentMetaGridMoveUpButton %>'
                                                                    Visible='<%# (Convert.ToInt32(Eval("SortRank")) > 3) %>' />
                                                                <asp:ImageButton ID="btnMoveDownMeta" runat="server" ImageUrl='<%# Page.ResolveUrl("~/Data/SiteImages/dn.gif") %>'
                                                                    CommandName="MoveDown" CommandArgument='<%# Eval("Guid") %>' AlternateText='<%# Resources.eStoreResources.ContentMetaGridMoveDownButton %>' />
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <%# Eval("Name") %>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                                <div class="settingrow">
                                                                    <mp:SiteLabel ID="lblName" runat="server" ForControl="txtName" CssClass="settinglabel"
                                                                        ConfigKey="ContentMetaNameLabel" ResourceFile="eStoreResources" />
                                                                    <asp:TextBox ID="txtName" CssClass="widetextbox forminput" runat="server" Text='<%# Eval("Name") %>' />
                                                                    <asp:RequiredFieldValidator ID="reqMetaName" runat="server" ControlToValidate="txtName"
                                                                        ErrorMessage='<%# Resources.eStoreResources.ContentMetaNameRequired %>' ValidationGroup="meta" />
                                                                </div>
                                                                <div class="settingrow">
                                                                    <mp:SiteLabel ID="lblMetaContent" runat="server" ForControl="txtMetaContent" CssClass="settinglabel"
                                                                        ConfigKey="ContentMetaMetaContentLabel" ResourceFile="eStoreResources" />
                                                                    <asp:TextBox ID="txtMetaContent" CssClass="verywidetextbox forminput" runat="server"
                                                                        Text='<%# Eval("MetaContent") %>' />
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName"
                                                                        ErrorMessage='<%# Resources.eStoreResources.ContentMetaContentRequired %>' ValidationGroup="meta" />
                                                                </div>
                                                                <div class="settingrow">
                                                                    <mp:SiteLabel ID="lblScheme" runat="server" ForControl="txtScheme" CssClass="settinglabel"
                                                                        ConfigKey="ContentMetaSchemeLabel" ResourceFile="eStoreResources" />
                                                                    <asp:TextBox ID="txtScheme" CssClass="widetextbox forminput" runat="server" Text='<%# Eval("Scheme") %>' />
                                                                </div>
                                                                <div class="settingrow">
                                                                    <mp:SiteLabel ID="lblLangCode" runat="server" ForControl="txtLangCode" CssClass="settinglabel"
                                                                        ConfigKey="ContentMetaLangCodeLabel" ResourceFile="eStoreResources" />
                                                                    <asp:TextBox ID="txtLangCode" CssClass="smalltextbox forminput" runat="server" Text='<%# Eval("LangCode") %>' />
                                                                </div>
                                                                <div class="settingrow">
                                                                    <mp:SiteLabel ID="lblDir" runat="server" ForControl="ddDirection" CssClass="settinglabel"
                                                                        ConfigKey="ContentMetaDirLabel" ResourceFile="eStoreResources" />
                                                                    <asp:DropDownList ID="ddDirection" runat="server" CssClass="forminput">
                                                                        <asp:ListItem Text="" Value=""></asp:ListItem>
                                                                        <asp:ListItem Text="ltr" Value="ltr"></asp:ListItem>
                                                                        <asp:ListItem Text="rtl" Value="rtl"></asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </div>
                                                                <div class="settingrow">
                                                                    <asp:Button ID="btnUpdateMeta" runat="server" Text='<%# Resources.eStoreResources.ContentMetaGridUpdateButton %>'
                                                                        CommandName="Update" ValidationGroup="meta" CausesValidation="true" />
                                                                    <asp:Button ID="btnDeleteMeta" runat="server" Text='<%# Resources.eStoreResources.ContentMetaGridDeleteButton %>'
                                                                        CommandName="Delete" CausesValidation="false" />
                                                                    <asp:Button ID="btnCancelMeta" runat="server" Text='<%# Resources.eStoreResources.ContentMetaGridCancelButton %>'
                                                                        CommandName="Cancel" CausesValidation="false" />
                                                                </div>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField>
                                                            <ItemTemplate>
                                                                <%# Eval("MetaContent") %>
                                                            </ItemTemplate>
                                                            <EditItemTemplate>
                                                            </EditItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </mp:mojoGridView>
                                                <div class="settingrow">
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <asp:Button ID="btnAddMeta" runat="server" />&nbsp;
                                                            </td>
                                                            <td>
                                                                <asp:UpdateProgress ID="prgMeta" runat="server" AssociatedUpdatePanelID="upMeta">
                                                                    <ProgressTemplate>
                                                                        <img src='<%= Page.ResolveUrl("~/Data/SiteImages/indicators/indicator1.gif") %>'
                                                                            alt=' ' />
                                                                    </ProgressTemplate>
                                                                </asp:UpdateProgress>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </div>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </div>
                                    <div class="settingrow">
                                        &nbsp;</div>
                                </div>
                                <div>
                                    <portal:mojoButton ID="btnSave" runat="server" ValidationGroup="Product" />
                                    <portal:mojoButton ID="btnDelete" runat="server" CausesValidation="false" />
                                </div>
                                <div>
                                    <asp:RequiredFieldValidator ID="reqName" runat="server" ControlToValidate="txtName"
                                        Display="None" ValidationGroup="Product" />
                                    <asp:RequiredFieldValidator ID="reqPrice" runat="server" ControlToValidate="txtPrice"
                                        Display="None" ValidationGroup="Product" />
                                    <asp:ValidationSummary ID="vSummary" runat="server" ValidationGroup="Product" />
                                    <portal:mojoLabel ID="lblError" runat="server" CssClass="txterror" />
                                </div>
                            </div>
                        </asp:Panel>
                        <asp:Panel ID="pnlNoCategory" runat="server">
                            <asp:Literal ID="ltrInfo" runat="server" />
                            <asp:HyperLink ID="hplAddCategory" runat="server" />
                        </asp:Panel>
                        <div class="cleared">
                        </div>
                    </fieldset>
                </div>
            </portal:mojoPanel>
            <div class="cleared">
            </div>
        </asp:Panel>
        <mp:CornerRounderBottom ID="cbottom1" runat="server" />
    </portal:mojoPanel>
</asp:Content>
<asp:Content ContentPlaceHolderID="rightContent" ID="MPRightPane" runat="server" />
<asp:Content ContentPlaceHolderID="pageEditContent" ID="MPPageEdit" runat="server" />
